package com.huawei;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Description: HJ108 求最小公倍数
 * least common multiple（LCM）
 * <p>
 * greatest common divisor最大公约数
 *
 * @author weiruibai.vendor
 * Date: 2022/9/2 09:45
 */
public class HJ108 {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        Integer a = Integer.parseInt(reader.readLine());
        Integer b = Integer.parseInt(reader.readLine());
        int res = greatestCommonDivisor(a, b);
        int ans =leastCommonMultiple(a*b,res);
        System.out.println(ans);
    }

    private static int leastCommonMultiple(int i, int res) {
        return i/res;
    }


    /**
     * eg:
     * a=45 b=35
     * 1、45%35=10
     * 2、35%10=5
     * 3、10%5=0
     * 结果是5
     *
     * @param a
     * @param b
     * @return
     */
    private static int greatestCommonDivisor(Integer a, Integer b) {
        if (b == 0) {
            return a;
        }
        return greatestCommonDivisor(b, a % b);
    }
}
